package com.pictureBook.merchant.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pictureBook.merchant.entity.StoreUser;
import com.pictureBook.merchant.mapper.StoreUserMapper;
import com.pictureBook.merchant.service.IStoreUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Ding
 * @since 2022-01-07
 */
@Service
public class StoreUserServiceImpl extends ServiceImpl<StoreUserMapper, StoreUser> implements IStoreUserService {

    @Resource
    private StoreUserMapper storeUserMapper;

    @Override
    public PageInfo<StoreUser> getList(Integer index, Integer num, Integer soId,Map<String,Object> searchText) {
        PageHelper.startPage(index,num);
        return new PageInfo<>(storeUserMapper.getList(soId,searchText));
    }

    @Override
    public PageInfo<StoreUser> getListRecycle(Integer index, Integer num, Integer soId) {
        PageHelper.startPage(index,num);
        return new PageInfo<>(storeUserMapper.getListRecycle(soId));
    }

    @Override
    public PageInfo<StoreUser> getListLeave(Integer index, Integer num, Integer soId) {
        PageHelper.startPage(index,num);
        return new PageInfo<>(storeUserMapper.getListLeave(soId));
    }
}
